package com.ctshk.app.order.goods.controller;

import com.ctshk.common.annotations.OperationLogAnnotation;
import com.ctshk.common.dto.Result;
import com.ctshk.common.enums.OperationLogModel;
import com.ctshk.common.enums.OperationLogType;
import com.ctshk.common.web.support.BaseController;
import com.ctshk.rpc.order.goods.dto.ShoppingSpecialDetailedDTO;
import com.ctshk.rpc.order.goods.req.ShoppingSpecialPageReq;
import com.ctshk.rpc.order.goods.service.IShoppingSpecialService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description
 * 专题相关
 * @author 黄利斌
 * @date 2021/5/28 11:06 上午
 */
@Api(value="商城C端专题", tags="商城C端专题")
@RestController
@RequestMapping("/shopping/special")
public class OrderShoppingSpecialController extends BaseController {
    @DubboReference
    private IShoppingSpecialService shoppingSpecialService;

    @ApiOperation(value = "查询商城专题明细", notes = "查询商城专题明细")
    @OperationLogAnnotation(operModul = OperationLogModel.SYSTEM, operType = OperationLogType.QUERY, operTitle = "查询商城专题明细", operDesc = "查询商城专题明细")
    @PostMapping("/findShoppingSpecialDetailed")
    public Result<ShoppingSpecialDetailedDTO> findShoppingSpecialDetailed(@RequestBody ShoppingSpecialPageReq req) {
        ShoppingSpecialDetailedDTO response = shoppingSpecialService.findShoppingSpecialDetailed(req);
        return Result.success(response);
    }
}
